from urllib.request import urlopen
from bs4 import BeautifulSoup
import re

def extract_image_name(openUrl):
    pattern = r'/([^/]+)$'
    match = re.search(pattern, openUrl)
    if match:
        return match.group(1)
    else:
        return None

def get_id(url):
    pattern = r'kuid=(\d+)'
    match = re.search(pattern, url)
    return (match.group(1))

   